﻿using System;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;

namespace Guan.CMS.Web.ViewModels.Product
{
    /// <summary>
    /// 产品
    /// </summary>
    public class ProductFormModel
    {
        [DisplayName("编码")]
        public int Id { get; set; }
        /// <summary>
        /// 已发布
        /// </summary>
        [DisplayName("已发布")]
        public bool IsPublished { get; set; }

        /// <summary>
        /// 已删除
        /// </summary>
        [DisplayName("已删除")]
        public bool IsDeleted { get; set; }

        /// <summary>
        /// 产品名称
        /// </summary>
        [StringLength(100),DisplayName("产品名称"),Required]
        public string Name { get; set; }

        /// <summary>
        /// 图片路径
        /// </summary>
        [StringLength(100), DisplayName("图片")]
        public string ImageUrl { get; set; }

        /// <summary>
        /// 概要
        /// </summary>
        [StringLength(1024), DisplayName("概要")]
        public string ShortDescription { get; set; }

        /// <summary>
        /// 描述
        /// </summary>
        [DisplayName("描述")]
        public string FullDescription { get; set; }

        /// <summary>
        /// 已推荐
        /// </summary>
        [DisplayName("已推荐")]
        public bool IsRecommend { get; set; }

        /// <summary>
        /// 添加时间
        /// </summary>
        [DisplayName("添加时间"), DisplayFormat(DataFormatString="{0:yyyy-MM-dd HH:mm:ss}")]
        public DateTime? CreatedTime { get; set; }

        /// <summary>
        /// 更新时间
        /// </summary>
        [DisplayName("更新时间"), DisplayFormat(DataFormatString = "{0:yyyy-MM-dd HH:mm:ss}")]
        public DateTime? UpdatedTime { get; set; }

        [DisplayName("分类")]
        public int? CategoryId { get; set; }

        /// <summary>
        /// Meta关键字
        /// </summary>
        [DisplayName("关键字"), StringLength(500)]
        public string MetaKeywords { get; set; }

        /// <summary>
        /// Meta描述
        /// </summary>
        [DisplayName("描述"), StringLength(1024)]
        public string MetaDescription { get; set; }

        /// <summary>
        /// Meta标题
        /// </summary>
        [DisplayName("标题"), StringLength(500)]
        public string MetaTitle { get; set; }

        /// <summary>
        /// 搜索引擎友好名称
        /// </summary>
        [DisplayName("友好名称"), StringLength(1024)]
        public string FriendlyName { get; set; }
    }
}
